<template>
    <div id="app">
      <el-form label-width="100px">
        <el-form-item label="名称">
          {{food.name}}
        </el-form-item>
        <el-form-item label="原价">
          {{food.oldPrice}}
        </el-form-item>

        <el-form-item label="优惠价">
          {{food.price}}
        </el-form-item>

        <el-form-item label="描述">
          {{food.descrption}}
        </el-form-item>

        <el-form-item label="类别">
          {{food.category.name}}
        </el-form-item>

        <el-form-item label="图片">
          <img :src="'http://localhost:8989/'+food.pic" width="500"/>
        </el-form-item>
      </el-form>
    </div>
</template>

<script>
    export default {
      data(){
        return {
          food: {}
        }
      },
      created() {
        this.axios.get("/food/selectOne/"+this.$route.query.fid).then((resp)=>{
          this.food=resp.data;
        });
      }
    }
</script>


<style scoped>

</style>
